package org.jypj.dev.task;

import org.jypj.dev.service.IGiveWorkService;
import org.jypj.dev.service.ITrainWorkService;
import org.jypj.dev.util.DateUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by ChenYu on 2017-04-07.
 */
@Component
public class WorkTask {


    @Resource
    private IGiveWorkService giveWorkService;

    /**
     * 叫班 每五分钟查询一次
     */
    @Scheduled(cron = "0 0/3 * * * ?")
    public void remindWorkTask() {
        try {
            giveWorkService.remindWork();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
